-- GENERATED SPELL FOR [Shadowmoon Champion] --


function spell0_22880(pUnit, Event) --@Chaotic Light,n/a--
pUnit:FullCastSpellOnTarget(41063,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_22880', 557, 1)
end

function spell1_22880(pUnit, Event) --@Whirling Blade,n/a--
pUnit:FullCastSpellOnTarget(41053,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_22880', 15000, 1)
end

function Sorts_22880(pUnit, Event)
local choix_sorts_22880 = math.random(0, 1)
if choix_sorts_22880 == 0 then
pUnit:RegisterEvent('spell0_22880', 1, 1)
end
if choix_sorts_22880 == 1 then
pUnit:RegisterEvent('spell1_22880', 1, 1)
end
end

function mob22880_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_22880', math.random(1500, 3000), 1)
end

function mob22880_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob22880_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob22880_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(22880, 1, 'mob22880_Action')
RegisterUnitEvent(22880, 2, 'mob22880_Leave')
RegisterUnitEvent(22880, 3, 'mob22880_Kill')
RegisterUnitEvent(22880, 4, 'mob22880_Die')
